package windows;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JTextArea;

public class ManageInsumosDelete extends JPanel implements ActionListener
{

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private JButton Delete;
	private JButton search;
	
	private JLabel TextNameInsumo;
	private JLabel TextCodInsumo;
	private JLabel TextEgg;
	private JLabel TextFlour;
	private JLabel TextSugar;
	private JLabel TextMilk;
	private JLabel TextColoring;
	private JLabel TextSabor;
	private JLabel TextStraberry;
	private JLabel TextRaisin;

	private JTextArea AreaNameInsumo;
	private JTextArea AreaCodInsumo;
	
	private JRadioButton RButtonEgg;
	private JRadioButton RButtonFlour;
	private JRadioButton RButtonSugar;
	private JRadioButton RButtonMilk;
	private JRadioButton RButtonColoring;
	private JRadioButton RButtonSabor;
	private JRadioButton RButtonStraberry;
	private JRadioButton RButtonRaisin;


	private JTextArea AreaEgg;
	private JTextArea AreaFlour;
	private JTextArea AreaSugar;
	private JTextArea AreaMilk;
	private JTextArea AreaColoring;
	private JTextArea AreaSabor;
	private JTextArea Areastraberry;
	private JTextArea AreaRaisin;


	
	
	public ManageInsumosDelete()
	{
		// TODO Auto-generated constructor stub

		setLayout(null);

		RButtonEgg=new JRadioButton();
		RButtonEgg.setBounds(230,155, 30, 20);
		RButtonEgg.setEnabled(false);
		add(RButtonEgg);
		
		RButtonFlour=new JRadioButton();
		RButtonFlour.setBounds(230,85, 30, 20);
		RButtonFlour.setEnabled(false);
		add(RButtonFlour);
		
		RButtonSugar=new JRadioButton();
		RButtonSugar.setBounds(230,120, 30, 20);
		RButtonSugar.setEnabled(false);
		add(RButtonSugar);
		
		RButtonMilk=new JRadioButton();
		RButtonMilk.setBounds(230,225, 30, 20);
		RButtonMilk.setEnabled(false);
		add(RButtonMilk);
		
		RButtonColoring=new JRadioButton();
		RButtonColoring.setBounds(230,260, 30, 20);
		RButtonColoring.setEnabled(false);
		add(RButtonColoring);
		
		RButtonSabor=new JRadioButton();
		RButtonSabor.setBounds(230,190, 30, 20);
		RButtonSabor.setEnabled(false);
		add(RButtonSabor);
		
		RButtonStraberry=new JRadioButton();
		RButtonStraberry.setBounds(230,295, 30, 20);
		RButtonStraberry.setEnabled(false);
		add(RButtonStraberry);
		
		RButtonRaisin=new JRadioButton();
		RButtonRaisin.setBounds(230,330, 30, 20);
		RButtonRaisin.setEnabled(false);
		add(RButtonRaisin);
		


		/*********************************JTextArea***********************************************/


		AreaFlour=new JTextArea();
		AreaFlour.setBounds(300, 85, 40, 25);
		AreaFlour.setEnabled(false);
		add(AreaFlour);

		AreaSugar=new JTextArea();
		AreaSugar.setBounds(300, 120, 40, 25);
		AreaSugar.setEnabled(false);
		add(AreaSugar);

		AreaEgg=new JTextArea();
		AreaEgg.setBounds(300, 155, 40, 25);
		AreaEgg.setEnabled(false);
		add(AreaEgg);

		AreaSabor=new JTextArea();
		AreaSabor.setBounds(300,190, 40, 25);
		AreaSabor.setEnabled(false);
		add(AreaSabor);
		
		AreaMilk=new JTextArea();
		AreaMilk.setBounds(300, 225, 40, 25);
		AreaMilk.setEnabled(false);
		add(AreaMilk);

		AreaColoring=new JTextArea();
		AreaColoring.setBounds(300, 260, 40, 25);
		AreaColoring.setEnabled(false);
		add(AreaColoring);

		
		Areastraberry=new JTextArea();
		Areastraberry.setBounds(300, 295, 40, 25);
		Areastraberry.setEnabled(false);
		add(Areastraberry);

		AreaRaisin=new JTextArea();
		AreaRaisin.setBounds(300, 330, 40, 25);
		AreaRaisin.setEnabled(false);
		add(AreaRaisin);


		
		/***************************JButton**************************************/
		Delete = new JButton("Eliminar");
		Delete.setBounds(170,400, 100, 20);
		Delete.addActionListener(this);
		Delete.setVisible(false);
		add(Delete);

		search= new JButton("Buscar");
		search.setBounds(370,15, 80, 20);
		search.addActionListener(this);
		add(search);

	    /******************************JLabel**********************************/

		TextCodInsumo=new JLabel("Codigo:");
		TextCodInsumo.setBounds(50, 15, 150, 25);
		add(TextCodInsumo);		
		
		TextNameInsumo = new JLabel("Nombre Lista:");
		TextNameInsumo.setBounds(50, 50, 150, 25);
		add(TextNameInsumo);

		TextFlour = new JLabel("Harina:");
		TextFlour.setBounds(50, 85, 150, 25);
		add(TextFlour);

		TextSugar = new JLabel("Azucar:");
		TextSugar.setBounds(50, 120, 150, 25);
		add(TextSugar);

		TextEgg=new JLabel("Huevos");
		TextEgg.setBounds(50, 155, 150, 25);
		add(TextEgg);
		
		TextSabor=new JLabel("Saborizantes");
		TextSabor.setBounds(50, 190, 150, 25);
		add(TextSabor);
		
		TextMilk=new JLabel("Leche:");
		TextMilk.setBounds(50, 225, 150, 25);
		add(TextMilk);

		TextColoring=new JLabel("Colorantes:");
		TextColoring.setBounds(50, 260, 150, 25);
		add(TextColoring);

		TextStraberry=new JLabel("Fresas:");
		TextStraberry.setBounds(50, 295, 150, 25);
		add(TextStraberry);
		
		TextRaisin=new JLabel("Uvas Pasas:");
		TextRaisin.setBounds(50, 330, 150, 25);
		add(TextRaisin);
		
		/****************************JTextArea*************************************/
		AreaNameInsumo = new JTextArea();
		AreaNameInsumo.setBounds(200, 50, 150, 20);
		AreaNameInsumo.setEditable(false);
		add(AreaNameInsumo);

		AreaCodInsumo = new JTextArea();
		AreaCodInsumo.setBounds(200, 15, 150, 20);
		add(AreaCodInsumo);

		
		/*******************************************************/


		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		setBounds((screenSize.width-664)/2, (screenSize.height-456)/2, 670, 310);
	}



	public void actionPerformed(ActionEvent e)
	{
		
		if(e.getSource()==Delete)
		{

		}
		if(e.getSource()==search)
		{
			Delete.setVisible(true);
		}

	}
	
}
